<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page language="java" pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<link rel="stylesheet"
	href="<c:url value="/resources/lib/bootstrap-3.3.5/css/bootstrap.min.css"/>" />
<link href="/resources/lib/font-awesome-4.4.0/css/font-awesome.min.css"
	rel="stylesheet" type="text/css" />
<link href="/resources/css/header.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="<c:url value="/resources/css/common.css"/>" />
<link rel="stylesheet"
	href="<c:url value="/resources/css/project/projectDetail.css"/>" />

<script src="<c:url value="/resources/lib/jquery-2.1.4.min.js" />"
	type="text/javascript"></script>
<script
	src="<c:url value="/resources/lib/bootstrap-3.3.5/js/bootstrap.min.js" />"
	type="text/javascript"></script>
<script
	src="<c:url value="/resources/lib/angular-1.4.7/angular.min.js"/>"
	type="text/javascript">
	
</script>
<script src="<c:url value="/resources/js/project/projectDetail.js" />"
	type="text/javascript"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Project detail</title>
</head>
<body ng-app="conversionTool">
	<ng-include src="'/resources/viewPart/nav.html'"> </ng-include>
	<header>
		<div class="head-line">
			<h3 class="head-title">Project Detail</h3>
		</div>
	</header>

	<section class="container" ng-controller="projectDetailCtrl">

		<div ng-init="project.id='${project.id}'" />


                  
		   <div class="row project_detail">
			
				<div class="col-xs-4 text-right">
					<label for="projectName">project Name</label>
				</div>
				<div class=col-xs-8>
					<input type="text" class="form-control" id="projectName"
						ng-model="project.projectName" disabled
						ng-init="project.projectName='${project.projectName} '"
						placeholder="please enter project name" />
				</div>
				</div>
			

			<div class="row project_detail">
				<div class="col-xs-4 text-right">
					<label for="description">Description</label>
				</div>
				<div class="col-xs-8">
					<textarea id="description" class="form-control" disabled
						ng-init="project.description='${project.description}'"
						ng-model="project.description"></textarea>
				</div>
			</div>

			<div class="row project_detail">
				<div class="col-xs-4 text-right">
					<label for="operation">Operation</label>
				</div>   
				<div class="col-xs-8"></div>
				</div>
				
				<div class="row project_detail">
				<div class="col-xs-4 text-right"></div>
				
				<div class="col-xs-8">
					<form method="post" action="/project/operationDetail">
						<input type="hidden" name="id" value="${project.id}" /> <input
							type="hidden" id="OperationId" name="operationId" />
						<table class="table table-bordered">
							<thead>
								<tr>
									<th>Operation Name</th>
									<th>Data Type Name</th>
									<th>Connection Name</th>
									<th>View Operation</th>
									<th>Delete</th>
								</tr>
							</thead>
							<tbody>
								<tr ng-repeat="item in operations">
									<td>{{item.operationName}}</td>
									<td>{{item.dataAdaptorData.adaptorName }}</td>
									<td>{{ item.soapConnectionData.connectionName }}</td>
									<td>
									<!-- <input type="submit" value="view" class="btn btn-default" ng-click="viewOperation(item.id)" /> -->
									<button type="submit"  class="btn btn-default btn-border"  ng-click="viewOperation(item.id)" >
									
									 <span><i class="glyphicon glyphicon-edit"></i></span>
									</button>
									
									
									</td>
									<td>
									
									<!--<input type="button" value="delete"
										class="btn btn-default" ng-click="deleteOperation(item.id)" /> -->
									<button type="button"  class="btn btn-default btn-border" ng-click="deleteOperation(item.id)" >
									 <span><i class="glyphicon glyphicon-trash"></i></span>
									</button>
										
										</td>
								</tr>
							</tbody>
						</table>
					</form>
				</div>
			</div>
			
		 <div class="row project_detail">
		 <div class="col-xs-4"></div>
		 <div class="col-xs-8 text-right">
		<form method="post" action="/project/operationDetail">
			<input type="hidden" name="id" value="${project.id}" />
			<div class="form-group">
			<input type="submit" value="Add Operation"
				class="btn btn-primary" />
			 </div>
		</form>
		</div>
		</div>
		<div class="form-group text-center form-line">{{msg}}</div>
	</section>


</body>
</html>